import React, { Component } from 'react';
import { View, Text, Button, StatusBar } from 'react-native';
import Permission from './../../js/permission';

export default class PermissionPage extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      <View
        style={{
          flex: 1,
          paddingTop: StatusBar.currentHeight,
          justifyContent: 'space-around'
        }}
      >
        <StatusBar
          translucent
          hidden={false}
          barStyle="dark-content"
          backgroundColor="transparent"
        />
        <Button
          title="初始化"
          onPress={() => {
            Permission.init();
          }}
        />
        <Button
          title="申请权限"
          onPress={() => {
            Permission.requestPermission();
          }}
        />
      </View>
    );
  }
}
